home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: in2.uu.net!world!mv!usenet
- From: ENGR@GSSI.MV.COM (Michael Furman)
- Subject: Re: Pure virtual destructors?
- Message-ID: <DpytLx.9qq@mv.mv.com>
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- Organization: GSSI
- Date: Tue, 16 Apr 1996 17:22:44 GMT
- References: <4kuq0i$p6t@ftp.ee.vill.edu>
- X-Newsreader: WinVN 0.99.7
- X-Nntp-Posting-Host: gssi.mv.com
-
- In article <4kuq0i$p6t@ftp.ee.vill.edu>, sheridan@monet.vill.edu says...
- >
- >
- >The rule with destructors is that they are always overridden, right?
- >That's a quote from VC4 docs, BTW. When I do this:
- >
- >class CBase {
- >public:
- > virtual ~CBase() = 0;
- >...};
- >
- >class CChild : public CBase {
- >public:
- > ~CChild();
- >...};
- >
- >and declare a body for ~CChild, I always get unresolved external on
- >CBase::~CBase. I have seen this in several cases. My guess is it's not
- >a compiler bug, so what am I missing?
-
- You are missing the definition of CBase::~Cbase(). You must privide it
- even if destructor declared as pure virtual.
- --
- <<< If you received it by E-mail: it is a copy of post to the newsgroup
- >>>
- ---------------------------------------------------------------
- Michael Furman, (603)893-1109
- Geophysical Survey Systems, Inc. fax:(603)889-3984
- 13 Klein Drive - P.O. Box 97 engr@gssi.mv.com
- North Salem, NH 03073-0097 71543.1334@compuserve.com
- ---------------------------------------------------------------
-
-